STEP 11: We'll use the color of the shape that the ball hit to determine what happens next!

Now if the ball hits the paddle, we are reversing the ball's y speed so it moves back towards the top of the stage!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)